import numpy as np

#从输入层到第一层
x = np.array([1.0, 0.5]) #输入变量
w = np.array([ [0.1,0.3,0.5], [0.2,0.4,0.6] ]) #权重
b1 = np.array([0.1,0.2,0.3]) #偏置
w.shape #(2,3)表示2行3列
a1 = np.dot(x, w) + b1 #内积

#利用激活函数转换
def sigmoid(x):
    return 1 / (1 + np.exp(-x))

z1 = sigmoid(a1)
print(z1)

